from diffusers import StableDiffusionPipeline
import torch
import os

print(os.getcwd())
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
# model_id = "prompthero/openjourney"
model_id="../mylangserver/app/miniSD-diffusers"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "draw a big fight between two cats"
image = pipe(prompt, width=256, height=256).images[0]
image.save("./retro_cars.png")

#pip install -U huggingface_hub
#huggingface-cli download --resume-download gpt2 --local-dir gpt2